package com.intelligentcar.springboot.service.serverImpl;

import com.intelligentcar.springboot.bean.Log;
import com.intelligentcar.springboot.mapper.LogMapper;
import com.intelligentcar.springboot.service.LogServer;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServerImpl implements LogServer {
    @Autowired
    private LogMapper logMapper;

    //记录日志
    @Override
    public int addLog(String logTime, String logType, String logUser, String logContent) {
        return logMapper.addLog(logTime, logType, logUser, logContent);
    }

    //查看日志记录表中的人员
    @Override
    public List<Log> user() {
        return logMapper.user();
    }

    @Override
    public List<Log> select(Log log,RowBounds rowBounds) {
        return logMapper.select(log,rowBounds);
    }

    @Override
    public List<Log> quanbu(RowBounds rowBounds) {
        return logMapper.quanbu(rowBounds);
    }

    @Override
    public int count() {
        return logMapper.count();
    }

    @Override
    public int count1(Log log) {
        return logMapper.count1(log);
    }
}
